package password

import (
	"fmt"
	"log"
)

// GenerateHashForPassword 生成密码的哈希值并打印
func GenerateHashForPassword(plainPassword string) string {
	hash, err := HashPassword(plainPassword)
	if err != nil {
		log.Fatalf("生成密码哈希失败: %v", err)
	}
	fmt.Printf("密码 '%s' 的哈希值: %s\n", plainPassword, hash)
	return hash
}